package struct.primary.linked;

/**
 * @author MAX
 * @version 1.0
 * @description 初级数据结构-链表
 * @date 2022/1/11 17:12
 */
public class LinkedListTest {

    public static void main(String[] args) {
        LinkedList<Integer> linkedList = new LinkedList<>();
        linkedList.addFirst(1);
        linkedList.addFirst(2);
        linkedList.addFirst(3);
        linkedList.addFirst(4);

        linkedList.add(1, 10);
        linkedList.addLast(22);
        linkedList.add(0, 23);
        linkedList.set(0, 33);
        System.out.println(linkedList);
        linkedList.remove(1);
        System.out.println(linkedList);
    }
}
